# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
# version must be kept in sync with libqalculate
pkgname=qalculate-qt
pkgver=4.9.0
pkgrel=0
pkgdesc="Multi-purpose desktop calculator - Qt version"
url="https://github.com/Qalculate/qalculate-qt"
# qmake is broken on riscv64
arch="all !riscv64"
license="GPL-2.0-or-later"
depends="gnuplot"
makedepends="qt6-qtbase-dev qt6-qttools-dev libqalculate-dev"
subpackages="$pkgname-doc"
source="https://github.com/Qalculate/qalculate-qt/releases/download/v$pkgver/qalculate-qt-$pkgver.tar.gz"
options="!check" # no test suite

build() {
	export CFLAGS="$CFLAGS -flto=auto"
	export CXXFLAGS="$CXXFLAGS -flto=auto"
	qmake6 PREFIX=/usr
	make
}

check() {
	make check
}

package() {
	make INSTALL_ROOT="$pkgdir" install
}

sha512sums="
5945d1c57db14b029bc59e084a02f4c81162a475bd353147dea2a294de239d3dcc3bf646ed695a0ca3f0893d3f52b97a0048b83940c000a1a4778bb8d9513054  qalculate-qt-4.9.0.tar.gz
"
